﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <link rel="stylesheet" href="~/jquery-easyui-1.8.6/themes/bootstrap/easyui.css" />
    <link rel="stylesheet" href="~/jquery-easyui-1.8.6/themes/icon.css" />
    <link rel="stylesheet" href="~/easyui-icons/IconExtension.css" />
    <link rel="stylesheet" href="~/css/style.css" />
    <style>
        html, body {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
        }

        body {
            display: flex;
            align-items: center; /*定义body的元素垂直居中*/
            justify-content: center; /*定义body的里的元素水平居中*/
        }
    </style>
    <script type="text/javascript" src="~/jquery-easyui-1.8.6/jquery.min.js" asp-append-version="false"></script>
    <script type="text/javascript" src="~/jquery-easyui-1.8.6/jquery.easyui.min.js" asp-append-version="false"></script>
    <script type="text/javascript" src="~/jquery-easyui-1.8.6/jquery-easyui-datagridview/datagrid-groupview.js" asp-append-version="false"></script>
    <script type="text/javascript" src="~/jquery-easyui-1.8.6/jquery-easyui-datagridview/datagrid-defaultview.js" asp-append-version="false"></script>
    <script type="text/javascript" src="~/jquery-easyui-1.8.6/jquery-easyui-datagridview/datagrid-scrollview.js" asp-append-version="false"></script>
    <script type="text/javascript" src="~/jquery-easyui-1.8.6/jquery-easyui-datagridview/datagrid-export.js" asp-append-version="false"></script>
    <script type="text/javascript" src="~/jquery-easyui-1.8.6/locale/easyui-lang-zh_CN.js" asp-append-version="false"></script>
    <title>login</title>
</head>
<body>
    <div class="easyui-panel" title="" style="width:100%;max-width:400px;padding:30px 60px;text-align:center;">
        <form id="ff" method="post">
            <div>
                <label for="loginname">登录名：</label>
                <input id="loginname" class="easyui-textbox" type="text" name="loginname" data-options="required:true" />
            </div>
            <br />
            <div>
                <label for="password">密&nbsp;&nbsp;&nbsp;码：</label>
                <input id="password" class="easyui-textbox" type="password" name="password" data-options="required:true" />
            </div>
            <div  style="text-align:center;padding:5px 0">
                <a id="btnGoLogin" class="easyui-linkbutton" >登录</a>
            </div>
        </form>
    </div>
    <script type="text/javascript">
        $(function () {
            $("#ff").form({
                url: "jwttoken3.0",
                success: function (data) {
                    console.info(data);
                    
                    data = JSON.parse(data);
                    if (data.success != undefined && data.success == true) {
                        localStorage.setItem('token', data.response.token);
                        window.location.href = "home/index";
                    }
                }
                
            });
            $("#btnGoLogin").bind('click', function () {
                $("#ff").form('submit');
            });
            
        });
    </script>
</body>
</html>
